package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.encoding.PasswordEncoder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import service.UserService;

/**
 * Created with IntelliJ IDEA.
 * User: spolyakov
 * Date: 3/19/14
 * Time: 2:17 PM
 * To change this template use File | Settings | File Templates.
 */

@Controller
public class RegistrationController {

    @Autowired
    UserService userService;

    @Autowired
    PasswordEncoder passwordEncoder;

    @RequestMapping("/home/register/")
    public ModelAndView register() {
        ModelAndView modelAndView = new ModelAndView("register");

        System.out.println(passwordEncoder.encodePassword("222222", "adm"));

        return modelAndView;
    }
}
